package cn.cocho.android.mct.file;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import cn.cocho.android.mc.file.FileDownload;

public class FileDownloadTest {
	String url="http://a.hiphotos.baidu.com/album/w%3D2048/sign=235f1ba737d12f2ece05a9607bfad462/d009b3de9c82d158940c23c1810a19d8bc3e4237.jpg";

	@Before
	public void setUp() throws Exception {
	}

	@Test
//	@Ignore
	public void testDownload() {//savePath文件路径，不能以“\\”结尾
		String savePath=FileUtilsTest.getCurrentPath()+"\\test\\image.png";
		System.out.println("savePath:"+savePath);
		FileDownload.download(url, savePath);
	}

	@Test
//	@Ignore
	public void testDownLoad() {
		int downloadSize=100;
		byte[] data=FileDownload.downLoad(url, downloadSize);
	}

}
